<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('做样详情信息')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li class="select-time">
                                <label>创建时间：</label>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>
            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:data:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:data:export">
                    <i class="fa fa-download"></i>导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        translate.selectLanguageTag.show = false; //不出现的select的选择语言
        translate.service.use('client.edge'); //设置机器翻译服务通道
        translate.execute();
        var prefix = ctx + "system/sample/data";
        var id = [[${mySample.id}]];
        $("#form-data-edit").validate({
            focusCleanup: true
        });

        $(function() {
            console.log(id);
            var options = {
                url: prefix + "/list",
                queryParams : queryParams,
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "做样详情信息",
                columns: [{
                    checkbox: true
                },
                    {
                        field: 'id',
                        title: '主键',
                        visible: false
                    },
                    {
                        field: 'sampleId',
                        title: '测样id',
                        visible: false
                    },
                    {
                        field: 'p1Now',
                        title: 'GCMS真空度'
                    },
                    {
                        field: 'p2Now',
                        title: '样品仓真空度'
                    },
                    {
                        field: 'cangtiH11Now',
                        title: '样品仓温度'
                    },
                    {
                        field: 'bujijingT3Now',
                        title: '捕集阱温度值'
                    },
                    {
                        field: 'bujijingT41Now',
                        title: '捕集阱前温度'
                    },
                    {
                        field: 'bujijingT42Now',
                        title: '捕集阱后温度'
                    },
                    {
                        field: 'createTime',
                        title: '创建时间'
                    }]
            };
            $.table.init(options);
        });
        function queryParams(params) {
            var search = $.table.queryParams(params);
            search.sampleId = id
            search.params = {
                beginCreateTime : beginOfTime($("#startTime").val()),
                endCreateTime : endOfTime($("#endTime").val())
            };
            return search;
        }
    </script>
</body>
</html>